home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / asm / games / blockscroller / readme.txt < prev    next >
Internet Message Format  |  1980-01-03  |  3KB

  1. From pdxgate!reed!batcomputer!rpi!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!noc.near.net!hri.com!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!aun.uninett.no!nuug!ifi.uio.no!larshaug Thu Dec 17 16:43:26 PST 1992
  2. Article 1577 of alt.sys.amiga.demos:
  3. Path: pdxgate!reed!batcomputer!rpi!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!noc.near.net!hri.com!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!aun.uninett.no!nuug!ifi.uio.no!larshaug
  4. >From: larshaug@ifi.uio.no (Lars Haugseth)
  5. Newsgroups: alt.sys.amiga.demos
  6. Subject: Source : Horizontal scroller
  7. Message-ID: <1992Dec12.193243.14082@ifi.uio.no>
  8. Date: 12 Dec 92 19:32:43 GMT
  9. Sender: larshaug@ifi.uio.no (Lars Haugseth)
  10. Organization: Dept. of Informatics, University of Oslo, Norway
  11. Lines: 403
  12. Nntp-Posting-Host: yrsa.ifi.uio.no
  13. Originator: larshaug@yrsa.ifi.uio.no
  14.  
  15.  
  16.  
  17.  
  18. It's time to hit the hardware again, and maybe earn
  19. some more flames. 8)
  20.  
  21. Ok, here is small program I made that simply scrolls
  22. a 5 bitplane 320x256 pixels picture leftwards, and inserts
  23. new graphics at the right edge of the screen. The graphics are
  24. built up by 16x16 pixel blocks. I have included some example
  25. block-data as a uuencoded LhA-archive. (Separate posting)
  26.  
  27. The scrolling works as follows:
  28.  
  29. After smooth-scrolling the picture 16 pixel with the BLTCON1 register,
  30. I add 2 bytes to the bitplane-pointers, and blit new blocks into the
  31. memory which lies off the right edge of the screen. It's as simple as
  32. that. It's very simple to extend the program to scroll in both directions,
  33. but that part you must figure out yourselves.
  34.  
  35. The memory usage for the graphics are [ SW * (SH + MX) ] bytes,
  36. where SW is the screenwidth in bytes, SH is the screenheight in
  37. pixels, and MX is the maximum number of screenwidths you can scroll.
  38. I have set MX=32, which means you can scroll 352x32 pixels, which
  39. should be more than enough for most vertical scrolling games.
  40.  
  41. Time usage is about 4 rasterlines pr.frame when scrolling 1 pixel at a time.
  42. If you'd like to scroll more pixel pr.frame, the time increases, but
  43. it's still pretty fast.
  44.  
  45. +-----------------------------------------------------------+
  46. | Lars Haugseth                                             +-+
  47. | Dept. of Informatics,               <larshaug@ifi.uio.no> | |
  48. | University of Oslo, Norway                                | |
  49. |                                                           | |
  50. |          If idiots could fly, this would be an airport... | |
  51. +-+---------------------------------------------------------+ |
  52.   +-----------------------------------------------------------+
  53.